#include <iostream>

using namespace std;

int main()
{
    string a;
    std:: cout<<"Introdu cuvantul: ";
    getline(cin,a);
    std::cout<<a<<endl;
    string b="";
    int n=a.size()-1;//lungimea lui a
    for (int j=n;j>=0;j--)
    {
        b=b+a[j];
    }
    std::cout<<b<<endl;
    return 0;
}
